@extends('layouts.header')
@section('title','智慧实验室')
@section('style')
    body{
    height:100%;
    overflow:hidden;
    background-color:rgb(1, 75, 132);
    background: url('/admin/static/myfolder/img/zks/back2.png') no-repeat;
    background-size:100% 100%;
    font-size:100%;
    line-height:2;
    }

    body::-webkit-scrollbar {
    width: 0 !important; /* remove scrollbar space /
    background: transparent; / optional: just make scrollbar invisible */
    }

    table > thead > tr > th  {
    font-size:110%;
    color: rgb(17, 208, 201);
    font-weight: bold;
    letter-spacing:2px;
    text-align:center;
    height:50px;
    }

    table > tbody > tr > td {
    background-color: rgb(1, 75, 132);
    color:#fff;
    border:#ccc 1px dashed;
    border-radius:10px;
    }
    
    /*以下设置标题栏不动，tbody超出部分滚动*/
    table tbody {
        display: block;
        height: {{request('tb_height'),'450'}}px;
        overflow-y: auto;
    }

    table thead, tbody tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    table thead { 
        width: calc( 100% - 1em)
    }
@endsection
@section('content')
    <article class="page-container" style="padding:30px;">
        <table class="text-c mt-10" id="datatable" style="border-collapse:separate; border-spacing:2px 10px;table-layout: fixed;">
            <thead>
            <tr>
                <th>条形码</th>
                <th>样品名称</th>
                <th>分类</th>
                <th>额定电压</th>
                <th>执行标准</th>
                <th width="23%;">试验项目</th>
                <th>数量</th>
                <th>主检人</th>
            </tr>
            </thead>
            <tbody>
            @foreach($data as $k=>$item)
                <tr>
                    <td>{{$item->bar_codes}}</td>
                    <td>{{$item->tool_name}}</td>
                    <td>{{$item->class}}</td>
                    <td>{{$item->voltage}}</td>
                    <td>{{$item->std_num}}</td>
                    <td>{{$item->item_names}}</td>
                    <td>{{$item->count}} {{$item->unit}}</td>
                    <td>{{$item->managers}}</td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </article>
@endsection